import React, { Component } from 'react';
import { render } from 'react-dom';
import './style.css';
import Img from './img/img.jpg';
import Img2 from './img/img2/pic.png';

// const oUl = <ul className="oul">
//     <li>1111111</li>
//     <li>22222222</li>
//     <li>333333333</li>
//     <img src={ Img } alt="" />
//     <img src={ Img2 } alt="" />
// </ul>

// 组件
// 1. 函数式组件  (函数里返回了html结构)

function Appp() {
    return React.createElement(
        'div',
        null,
        '\u6211\u662F\u4E00\u4E2A\u7EC4\u4EF6'
    );
}

// 2. 类组件 
class App extends Component {
    // 渲染内容 render
    render() {
        return React.createElement(
            'div',
            null,
            React.createElement(
                'h3',
                null,
                '\u6211\u662F\u7C7B\u7EC4\u4EF6'
            ),
            React.createElement(Appp, null),
            React.createElement(Appp, null)
        );
    }
}

render(React.createElement(App, null), document.getElementById('root'), () => {
    console.log('挂载成功');
});
